.class final Lcom/burstly/lib/feature/LazyXmlApplicationContext;
.super Lorg/springframework/context/support/ClassPathXmlApplicationContext;
.source "LazyXmlApplicationContext.java"


# instance fields
.field private final mBeanFactory:Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

.field private final mResManager:Lcom/burstly/lib/feature/ResourceManager;


# direct methods
.method constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 2
    .parameter "androidContext"
    .parameter "contextName"

    .prologue
    .line 51
    invoke-direct {p0}, Lorg/springframework/context/support/ClassPathXmlApplicationContext;-><init>()V

    .line 52
    new-instance v0, Lcom/burstly/lib/feature/ResourceManager;

    invoke-virtual {p1}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/burstly/lib/feature/ResourceManager;-><init>(Landroid/content/res/AssetManager;)V

    iput-object v0, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mResManager:Lcom/burstly/lib/feature/ResourceManager;

    .line 53
    new-instance v0, Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

    invoke-direct {v0}, Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mBeanFactory:Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

    .line 54
    iget-object v0, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mBeanFactory:Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

    invoke-virtual {p0, v0}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->setBeanFactory(Lorg/springframework/beans/factory/BeanFactory;)V

    .line 55
    invoke-virtual {p0, p2}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->processContext(Ljava/lang/String;)V

    .line 57
    return-void
.end method


# virtual methods
.method public getBean(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
    .locals 4
    .parameter "name"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/String;",
            "Ljava/lang/Class",
            "<TT;>;)TT;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/springframework/beans/BeansException;
        }
    .end annotation

    .prologue
    .line 66
    .local p2, requiredType:Ljava/lang/Class;,"Ljava/lang/Class<TT;>;"
    invoke-super {p0, p1, p2}, Lorg/springframework/context/support/ClassPathXmlApplicationContext;->getBean(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    .line 67
    .local v0, bean:Ljava/lang/Object;,"TT;"
    invoke-virtual {p0}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->getBeanPreProcess()Ljava/util/Map;

    move-result-object v1

    .line 68
    .local v1, beanPreProcess:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Lcom/h2/org/springframework/beans/Bean;>;"
    if-nez v0, :cond_1

    .line 69
    invoke-interface {v1, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/h2/org/springframework/beans/Bean;

    .line 70
    .local v2, rawBean:Lcom/h2/org/springframework/beans/Bean;
    if-eqz v2, :cond_1

    .line 71
    iget-object v3, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mBeanFactory:Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

    invoke-virtual {p0, v3, v2}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->processBean(Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;Lcom/h2/org/springframework/beans/Bean;)V

    .line 72
    iget-object v3, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mBeanFactory:Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;

    invoke-virtual {p0, v3, v2}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->processInnerBean(Lcom/h2/org/springframework/beans/factory/SimpleBeanFactory;Lcom/h2/org/springframework/beans/Bean;)V

    .line 73
    invoke-virtual {p0, p1, p2}, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->getBean(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    .line 80
    .end local v0           #bean:Ljava/lang/Object;,"TT;"
    .end local v2           #rawBean:Lcom/h2/org/springframework/beans/Bean;
    :cond_0
    :goto_0
    return-object v0

    .line 76
    .restart local v0       #bean:Ljava/lang/Object;,"TT;"
    :cond_1
    if-eqz v0, :cond_0

    invoke-interface {v1, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 78
    invoke-interface {v1, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0
.end method

.method public getResorceManager()Lcom/h2/org/springframework/beans/factory/IResourceManager;
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lcom/burstly/lib/feature/LazyXmlApplicationContext;->mResManager:Lcom/burstly/lib/feature/ResourceManager;

    return-object v0
.end method
